3.52 \(\int \frac{(d+e x) (A+B x+C x^2)}{(a+c x^2)^2} \, dx\)

Optimal. Leaf size=97 \[ \frac{\tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) (a B e+a C d+A c d)}{2 a^{3/2} c^{3/2}}-\frac{(d+e x) (a B-x (A c-a C))}{2 a c \left (a+c x^2\right )}+\frac{C e \log \left (a+c x^2\right )}{2 c^2} \]

[Out]

-((a*B - (A*c - a*C)*x)*(d + e*x))/(2*a*c*(a + c*x^2)) + ((A*c*d + a*C*d + a*B*e)*ArcTan[(Sqrt[c]*x)/Sqrt[a]])
/(2*a^(3/2)*c^(3/2)) + (C*e*Log[a + c*x^2])/(2*c^2)

________________________________________________________________________________________

Rubi [A]  time = 0.0824126, antiderivative size = 97, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.16, Rules used = {1645, 635, 205, 260} \[ \frac{\tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) (a B e+a C d+A c d)}{2 a^{3/2} c^{3/2}}-\frac{(d+e x) (a B-x (A c-a C))}{2 a c \left (a+c x^2\right )}+\frac{C e \log \left (a+c x^2\right )}{2 c^2} \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x)*(A + B*x + C*x^2))/(a + c*x^2)^2,x]

[Out]

-((a*B - (A*c - a*C)*x)*(d + e*x))/(2*a*c*(a + c*x^2)) + ((A*c*d + a*C*d + a*B*e)*ArcTan[(Sqrt[c]*x)/Sqrt[a]])
/(2*a^(3/2)*c^(3/2)) + (C*e*Log[a + c*x^2])/(2*c^2)

Rule 1645

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq,
a + c*x^2, x], f = Coeff[PolynomialRemainder[Pq, a + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + c
*x^2, x], x, 1]}, Simp[((d + e*x)^m*(a + c*x^2)^(p + 1)*(a*g - c*f*x))/(2*a*c*(p + 1)), x] + Dist[1/(2*a*c*(p
+ 1)), Int[(d + e*x)^(m - 1)*(a + c*x^2)^(p + 1)*ExpandToSum[2*a*c*(p + 1)*(d + e*x)*Q - a*e*g*m + c*d*f*(2*p
+ 3) + c*e*f*(m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, c, d, e}, x] && PolyQ[Pq, x] && NeQ[c*d^2 + a*e^2, 0] &
& LtQ[p, -1] && GtQ[m, 0] &&  !(IGtQ[m, 0] && RationalQ[a, c, d, e] && (IntegerQ[p] || ILtQ[p + 1/2, 0]))

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int \frac{(d+e x) \left (A+B x+C x^2\right )}{\left (a+c x^2\right )^2} \, dx &=-\frac{(a B-(A c-a C) x) (d+e x)}{2 a c \left (a+c x^2\right )}-\frac{\int \frac{-A c d-a (C d+B e)-2 a C e x}{a+c x^2} \, dx}{2 a c}\\ &=-\frac{(a B-(A c-a C) x) (d+e x)}{2 a c \left (a+c x^2\right )}+\frac{(C e) \int \frac{x}{a+c x^2} \, dx}{c}+\frac{(A c d+a C d+a B e) \int \frac{1}{a+c x^2} \, dx}{2 a c}\\ &=-\frac{(a B-(A c-a C) x) (d+e x)}{2 a c \left (a+c x^2\right )}+\frac{(A c d+a C d+a B e) \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right )}{2 a^{3/2} c^{3/2}}+\frac{C e \log \left (a+c x^2\right )}{2 c^2}\\ \end{align*}

Mathematica [A]  time = 0.104366, size = 102, normalized size = 1.05 \[ \frac{\frac{a^2 C e-a c (A e+B (d+e x)+C d x)+A c^2 d x}{a \left (a+c x^2\right )}+\frac{\sqrt{c} \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) (a B e+a C d+A c d)}{a^{3/2}}+C e \log \left (a+c x^2\right )}{2 c^2} \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)*(A + B*x + C*x^2))/(a + c*x^2)^2,x]

[Out]

((a^2*C*e + A*c^2*d*x - a*c*(A*e + C*d*x + B*(d + e*x)))/(a*(a + c*x^2)) + (Sqrt[c]*(A*c*d + a*C*d + a*B*e)*Ar
cTan[(Sqrt[c]*x)/Sqrt[a]])/a^(3/2) + C*e*Log[a + c*x^2])/(2*c^2)

________________________________________________________________________________________

Maple [A]  time = 0.052, size = 134, normalized size = 1.4 \begin{align*}{\frac{1}{c{x}^{2}+a} \left ({\frac{ \left ( Acd-aBe-Cad \right ) x}{2\,ac}}-{\frac{Ace+Bcd-aCe}{2\,{c}^{2}}} \right ) }+{\frac{Ce\ln \left ( c{x}^{2}+a \right ) }{2\,{c}^{2}}}+{\frac{Ad}{2\,a}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}}+{\frac{Be}{2\,c}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}}+{\frac{Cd}{2\,c}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)*(C*x^2+B*x+A)/(c*x^2+a)^2,x)

[Out]

(1/2*(A*c*d-B*a*e-C*a*d)/a/c*x-1/2*(A*c*e+B*c*d-C*a*e)/c^2)/(c*x^2+a)+1/2*C*e*ln(c*x^2+a)/c^2+1/2/a/(a*c)^(1/2
)*arctan(x*c/(a*c)^(1/2))*A*d+1/2/c/(a*c)^(1/2)*arctan(x*c/(a*c)^(1/2))*B*e+1/2/c/(a*c)^(1/2)*arctan(x*c/(a*c)
^(1/2))*C*d

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(C*x^2+B*x+A)/(c*x^2+a)^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.76906, size = 717, normalized size = 7.39 \begin{align*} \left [-\frac{2 \, B a^{2} c d +{\left (B a^{2} e +{\left (B a c e +{\left (C a c + A c^{2}\right )} d\right )} x^{2} +{\left (C a^{2} + A a c\right )} d\right )} \sqrt{-a c} \log \left (\frac{c x^{2} - 2 \, \sqrt{-a c} x - a}{c x^{2} + a}\right ) - 2 \,{\left (C a^{3} - A a^{2} c\right )} e + 2 \,{\left (B a^{2} c e +{\left (C a^{2} c - A a c^{2}\right )} d\right )} x - 2 \,{\left (C a^{2} c e x^{2} + C a^{3} e\right )} \log \left (c x^{2} + a\right )}{4 \,{\left (a^{2} c^{3} x^{2} + a^{3} c^{2}\right )}}, -\frac{B a^{2} c d -{\left (B a^{2} e +{\left (B a c e +{\left (C a c + A c^{2}\right )} d\right )} x^{2} +{\left (C a^{2} + A a c\right )} d\right )} \sqrt{a c} \arctan \left (\frac{\sqrt{a c} x}{a}\right ) -{\left (C a^{3} - A a^{2} c\right )} e +{\left (B a^{2} c e +{\left (C a^{2} c - A a c^{2}\right )} d\right )} x -{\left (C a^{2} c e x^{2} + C a^{3} e\right )} \log \left (c x^{2} + a\right )}{2 \,{\left (a^{2} c^{3} x^{2} + a^{3} c^{2}\right )}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(C*x^2+B*x+A)/(c*x^2+a)^2,x, algorithm="fricas")

[Out]

[-1/4*(2*B*a^2*c*d + (B*a^2*e + (B*a*c*e + (C*a*c + A*c^2)*d)*x^2 + (C*a^2 + A*a*c)*d)*sqrt(-a*c)*log((c*x^2 -
 2*sqrt(-a*c)*x - a)/(c*x^2 + a)) - 2*(C*a^3 - A*a^2*c)*e + 2*(B*a^2*c*e + (C*a^2*c - A*a*c^2)*d)*x - 2*(C*a^2
*c*e*x^2 + C*a^3*e)*log(c*x^2 + a))/(a^2*c^3*x^2 + a^3*c^2), -1/2*(B*a^2*c*d - (B*a^2*e + (B*a*c*e + (C*a*c +
A*c^2)*d)*x^2 + (C*a^2 + A*a*c)*d)*sqrt(a*c)*arctan(sqrt(a*c)*x/a) - (C*a^3 - A*a^2*c)*e + (B*a^2*c*e + (C*a^2
*c - A*a*c^2)*d)*x - (C*a^2*c*e*x^2 + C*a^3*e)*log(c*x^2 + a))/(a^2*c^3*x^2 + a^3*c^2)]

________________________________________________________________________________________

Sympy [B]  time = 6.4949, size = 318, normalized size = 3.28 \begin{align*} \left (\frac{C e}{2 c^{2}} - \frac{\sqrt{- a^{3} c^{5}} \left (A c d + B a e + C a d\right )}{4 a^{3} c^{4}}\right ) \log{\left (x + \frac{- 2 C a^{2} e + 4 a^{2} c^{2} \left (\frac{C e}{2 c^{2}} - \frac{\sqrt{- a^{3} c^{5}} \left (A c d + B a e + C a d\right )}{4 a^{3} c^{4}}\right )}{A c^{2} d + B a c e + C a c d} \right )} + \left (\frac{C e}{2 c^{2}} + \frac{\sqrt{- a^{3} c^{5}} \left (A c d + B a e + C a d\right )}{4 a^{3} c^{4}}\right ) \log{\left (x + \frac{- 2 C a^{2} e + 4 a^{2} c^{2} \left (\frac{C e}{2 c^{2}} + \frac{\sqrt{- a^{3} c^{5}} \left (A c d + B a e + C a d\right )}{4 a^{3} c^{4}}\right )}{A c^{2} d + B a c e + C a c d} \right )} - \frac{A a c e + B a c d - C a^{2} e + x \left (- A c^{2} d + B a c e + C a c d\right )}{2 a^{2} c^{2} + 2 a c^{3} x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(C*x**2+B*x+A)/(c*x**2+a)**2,x)

[Out]

(C*e/(2*c**2) - sqrt(-a**3*c**5)*(A*c*d + B*a*e + C*a*d)/(4*a**3*c**4))*log(x + (-2*C*a**2*e + 4*a**2*c**2*(C*
e/(2*c**2) - sqrt(-a**3*c**5)*(A*c*d + B*a*e + C*a*d)/(4*a**3*c**4)))/(A*c**2*d + B*a*c*e + C*a*c*d)) + (C*e/(
2*c**2) + sqrt(-a**3*c**5)*(A*c*d + B*a*e + C*a*d)/(4*a**3*c**4))*log(x + (-2*C*a**2*e + 4*a**2*c**2*(C*e/(2*c
**2) + sqrt(-a**3*c**5)*(A*c*d + B*a*e + C*a*d)/(4*a**3*c**4)))/(A*c**2*d + B*a*c*e + C*a*c*d)) - (A*a*c*e + B
*a*c*d - C*a**2*e + x*(-A*c**2*d + B*a*c*e + C*a*c*d))/(2*a**2*c**2 + 2*a*c**3*x**2)

________________________________________________________________________________________

Giac [A]  time = 1.15104, size = 151, normalized size = 1.56 \begin{align*} \frac{C e \log \left (c x^{2} + a\right )}{2 \, c^{2}} + \frac{{\left (C a d + A c d + B a e\right )} \arctan \left (\frac{c x}{\sqrt{a c}}\right )}{2 \, \sqrt{a c} a c} - \frac{{\left (C a d - A c d + B a e\right )} x + \frac{B a c d - C a^{2} e + A a c e}{c}}{2 \,{\left (c x^{2} + a\right )} a c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(C*x^2+B*x+A)/(c*x^2+a)^2,x, algorithm="giac")

[Out]

1/2*C*e*log(c*x^2 + a)/c^2 + 1/2*(C*a*d + A*c*d + B*a*e)*arctan(c*x/sqrt(a*c))/(sqrt(a*c)*a*c) - 1/2*((C*a*d -
 A*c*d + B*a*e)*x + (B*a*c*d - C*a^2*e + A*a*c*e)/c)/((c*x^2 + a)*a*c)